Skip to content

fix(turbopack): preserve imports used by merged re-exports - #196

Merged
fireairforce merged 1 commit into
utoofrom
zoomdong/fix-star-reexport-hygiene
Sep 26, 2026
Merged

fireairforce merged 1 commit into
utoofrom
zoomdong/fix-star-reexport-hygiene

Conversation

@fireairforce

@fireairforce fireairforce commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Summary

Preserve generated __TURBOPACK__imported__module__* binding names during the per-module hygiene pass. When several export * modules are concatenated, a re-export getter can still refer to the original import name while that pass renames the declaration. The merged-module hygiene pass can resolve collisions with the declaration and references together.

Reproduction

A production Utoopack build of imall-main emitted two FormListContext getters referencing an undeclared __TURBOPACK__imported__module__888359__. Importing a namespace from @alipay/tech-ui and reading its exports triggered a ReferenceError and a white page. The production chunk loaded successfully; this is generated JavaScript, not a public-path failure.

Verification

  • Built a release-local pack-napi with this change and completed the full imall-main production build using the affected dependency versions.
  • Scanned all 932 emitted JS files with Babel scope analysis: zero unbound generated import identifiers. The same scan finds the two original unbound references in the baseline build.
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings --no-deps

The companion utoo PR adds a snapshot fixture that executes the re-export getter and reproduces the original failure before this fix.

Companion regression fixture: utooland/utoo#3393.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T11:20:46.033638Z 370169d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fireairforce
fireairforce merged commit a787299 into utoo Sep 26, 2026
46 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant